﻿<?php

$connect = mysql_connect('localhost', 'tass', '114'); // DB 연결

$db_id=mysql_select_db("tass",$connect);  // DB 선택

$table_name = $_REQUEST['table_name'];
//$table_name = 'net_kor';
$sql = "SELECT * FROM $table_name;";

$rs = mysql_query($sql, $connect);

while($result = mysql_fetch_array($rs)){
  $seq = $result[seq];
  $english_text = $result[english_text];
  $korean_text = $result[korean_text];
  $finish = $result[finish];
      
$xmlList.="<paragraph><seq>$seq</seq><english_text>$english_text</english_text><korean_text>$korean_text</korean_text><finish>$finish</finish></paragraph>";

}

$xmlDoc = "<?xml version='1.0' encoding='utf-8'?><root>$xmlList</root>";
//$xmlDoc = iconv("", "utf-8", $xmlDoc); 
 echo $xmlDoc;


?>